package hu.tortavar.client;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Termek implements Serializable{

	  private static final long serialVersionUID = 1L;
	  @PrimaryKey
	  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	  private Long id;
	  @Persistent()
	  private String imageUrl;
	  @Persistent()
	  private String cim;
	  @Persistent()
	  private String leiras;
	  @Persistent
	  private int csoport; // 0:Hír, 1:Szelet, 2:Forma, 3, Esemény, 4:Apró_Sós, 5:Retesek
	  @Persistent()
	  private Boolean hir;
	  @Persistent()
	  private Date createDate;
	  @Persistent()
	  private String ar;
	  
	public Termek() {
		this.createDate = new Date();
	  }
	  
	  public Termek(String megnevezes, String leiras, String imageURL, int csoport, boolean hire, String ar) {
		this();
		this.cim = megnevezes;
		this.leiras = leiras;
		this.imageUrl = imageURL;
		this.csoport = csoport;
		this.hir = hire;
		this.ar = ar;
		
	  }
	  
	  public Long getId() {
		  return this.id;
	  }
	  
	  public String getImageUrl() {
		  return imageUrl;
	  }
	  
	  public String getCim() {
		  return cim;
	  }
	  
	  public String getLeiras() {
		  return leiras;
	  }
	  
	  public int getCsoport() {
		return csoport;
	}

	public void setCsoport(int csoport) {
		this.csoport = csoport;
	}

	public Boolean isHir() {
		  return hir;
	  }
	  
	  public String getAr() {
		  return ar;
	  }
	  
	  public Date getCreateDate() {
	    return this.createDate;
	  }
}
